package com.yubest.demo2.controller;

import com.yubest.demo2.feign.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author hweiyu
 * @Description
 * @Date 2021/7/14 16:47
 */
@RestController
public class RemoteController {

    @Autowired
    private HelloService helloService;

    @GetMapping("/remote")
    public String remote() {
        return helloService.hello("Tom");
    }

    @GetMapping("/home")
    public String home() {
        return "feign-service2";
    }

    @GetMapping("/ratelimit/a")
    public String ratelimitA() {
        return "feign-service2, ratelimit AAA!";
    }

    @GetMapping("/ratelimit/b")
    public String ratelimitB() {
        return "feign-service2, ratelimit BBB!";
    }

    @GetMapping("c/ratelimit")
    public String ratelimitCCC() {
        return "feign-service2, ratelimit CCC!";
    }
}
